
import ArrayTools;

class ArrayDemo {
	public static function main(){
		var arr = [1,2,3];
		ArrayTools.permute(arr);

		ArrayTools.shuffle(arr);
		trace(arr);
		trace(ArrayTools.combinations(arr,2));
		var itr = ArrayTools.allCombinators(arr);
		ArrayTools
		for (i in itr){ // a "select" value
			for (j in i){ // a returned set
				var a = new Array<Int>();
				for (k in j){ // an element in the returned set
					a.push(k);
				}

				var ptr = ArrayTools.permutators(a); // generate permutations of combination
			
				for (l in ptr){ // a permutation
					var pm = new Array<Int>();
					for (m in l){// a permutation element
						pm.push(m);
					}
					
					trace(pm);
					
				}	
			}
		}
	}
}